<?php

namespace App\Listeners;

use App\Events\Event;
use App\Winged\Auth\WingedGuard;
use Illuminate\Auth\Events\Login;
use App\Winged\Auth\Auth;

class EventListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  Event  $event
     * @return void
     */
    public function handle(Event $event)
    {
        //
    }

    public function onUserLogin($event)
    {

    }
    
    // 登录时间
    public function onUserLogout($events)
    {
//        SessionUser::removeCurrentUser();
    }

    // 登录失败 .


    /**
     * 为订阅者注册监听器。
     *
     * @param  Illuminate\Events\Dispatcher  $events
     */
    public function subscribe($events)
    {
//        $events->listen(
//            Login::class,
//            'App\Listeners\EventListener@onUserLogin'
//        );
//        $events->listen(
//            'Illuminate\Auth\Events\Logout',
//            'App\Listeners\EventListener@onUserLogout'
//        );
    }
}
